<?php

namespace App\Http\Controllers\YApi;

//use Illuminate\Http\Request;
use Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Session;
use Redirect;

use App\Models\UsersReg;
use App\Models\UsersFollow;

class FensilistController extends Controller
{

  	public function fensilist($uid)
  	{
    // 获得粉丝列表
    $pre_page = 15;
		$fensis = UsersFollow::where('friend_uid', $uid)->paginate($pre_page);

		foreach($fensis as $fensi)
		{
			$fensi['users'] = UsersReg::find($fensi->fans_uid);
		}

		return $fensis;
    }
    
}